<template>
	<view class="bg-light">
		<!-- 顶部标题组件 -->
		<tabsTop tabName="合美供销云平台"></tabsTop>
		<!-- <view v-if="point"></view>
		<view class="content" v-else>
			<view class="title-point">
				<view class="titlet">
					<text>积分换购</text>
				</view>
				<view class="myPoint">
					<image class="imgPoint" src="../../static/icon/780.jpg" mode=""></image>
					<view class="myPoint-text">
						<text>我的剩余积分</text>
						<text class="jifen">3000</text>
					</view>
				</view>
			</view>
		</view> -->
		<yHeader :screenWidth="screenWidth"></yHeader>
		<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltoupper="upper"
			@scrolltolower="lower" @scroll="scroll">
			<!-- 搜索框 -->
			<view class="search">
				<mySearch class="searchClick" @click="searchClick()"></mySearch>
			</view>
			<!-- 轮播图 -->
			<view class="uni-margin-wrap xpy flex" v-if="point">
				<view class="w-100">
					<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay"
						:interval="interval" :duration="duration"
						:style="screenWidth>480?'height: 900rpx;' :'height: 400rpx;'">
						<swiper-item v-for="(item,index) in lb_Src"
							@click="handleSwiper(item.Carousel_Chart_Path,item.Carousel_Chart_Name,item.ShopColumn_Id)"
							:key="index">
							<image :src="Domain_IMG+item.Picture_URL" alt="" style="width: 100%; height: 100%;">
						</swiper-item>
					</swiper>
				</view>
				<view v-if="screenWidth>480" class="flex-shrink" style="width: 25%;">
					<loginPC @WeChat="WeChat" :shopInfo="shopInfo"></loginPC>
				</view>
			</view>
			<!-- 轮播图下侧模块导航 -->
			<view class="bg-white xpy" v-if="point">
				<view class="mx-1 pt-2 flex justify-between flex-wrap">
					<view style="width: 20%;" class="flex flex-column align-center "
						v-for="(item,index) in dh_Icons.slice(0,10)" :key="index"
						@click="navClick(item.url,item.ShopColumn_Id,item.name)">
						<view class="imgae_ten" style="">
							<image :src="Domain_IMG+item.src" alt="" class="img">
							</image>
						</view>
						<view class="text_ten flex justify-center align-center py-3 mb-2">
							{{item.name}}
						</view>
					</view>
				</view>
			</view>
			<!-- 遍历 -->
			<view class="xpy" v-for="(item,index) in columns" :key="index">
				<view class="w-100 mt-1 mb-2">
					<view v-if="index != 1||screenWidth>480" class="h3 flex justify-between align-center px-2 bg-white"
						style="height: 100rpx;border-left: 10rpx solid green;"
						:style="index==columns.length-1?'border-radius: 12rpx;':''">
						<!-- 导航紧挨着的标题 -->
						<text class="font-lg">{{item.Column_Name}}</text>
						<view style="width: 60rpx;height: 78rpx;">
							<image :src="Domain_ICON+'/fire.png'" alt="" mode="aspectFit" class="img"></image>
						</view>
					</view>
					<image v-if="index == 1" :src="Domain_ICON+'/hwyx.webp'"
						:style="screenWidth>480?'height: 400rpx;':'height: 200rpx;'" class="img" alt=""></image>
				</view>
				<!-- 第一个类目 -->
				<view v-if="index==0" class="px-2 flex flex-wrap justify-between bg-white"><!--dztj-->
					<view class="mt-1" v-for="(item1,index1) in item.Data" :key="index1"
						@click="productClick(item1.Article_Name,item1.Article_SerialNumber,item1.Sales_Unit_Price_SerialNumber,item1.Store_SerialNumber,item1.ShopColumn_Id)"
						style="border:1px solid rgb(22,118,58);"
						:style="screenWidth<480?'height: 350rpx;width: 49% ;':'width: 24% ;height: 400rpx;'">
						<image :src="Domain_IMG+item1.Picture_URL" mode="aspectFit" class="img"></image>
					</view>
				</view>
				<!-- 其他类目 -->
				<view v-else class="flex" :class="screenWidth>480?'flex-wrap':'flex-column'">
					<view class="mb-3 py-1 px-2 flex " :class="screenWidth>480?'bg-white ml-1 rounded-lg':''"
						:style="screenWidth>480?'width: 22%;':''" style="height: 250rpx;"
						v-for="(item1,index1) in item.Data" :key="index1"
						@click="productClick(item1.Article_Name,item1.Article_SerialNumber,item1.Sales_Unit_Price_SerialNumber,item1.Store_SerialNumber,item1.ShopColumn_Id)">
						<!-- 左侧商品图片 -->
						<view class="left"
							style="width:55%; height: 100%; background-color: #fff;border:1px solid rgb(22,118,58);">
							<image :src="Domain_IMG+item1.Picture_URL" class="img" alt="" mode="aspectFit"></image>
						</view>
						<!-- 右侧商品信息 -->
						<view class="right ml-2 flex flex-column justify-between w-100">
							<view class="">
								<!-- 商品名 -->
								<view class="font">{{item1.Article_Name}}</view>
							</view>
							<view class="flex justify-between">
								<!-- 商品价格 -->

								<view class="flex align-center align-center" v-if="point">
									<money :money="item1.Sales_Unit_Price"></money>
								</view>
								<view class="flex align-center align-center" v-else>
									<text
										class="font-md font-weight-bold text-success">{{item1.Sales_Unit_Price}}积分</text>
								</view>
								<!-- 购物车字体 -->
								<view style="width: 40rpx; height: 40rpx;z-index: 10;" @click.stop="shopCart(item1)">
									<image :src="Domain_ICON+'/shopcart.png'" mode="" class="img" style=""></image>
								</view>
							</view>
						</view>
					</view>
				</view>
				<view v-if="index!=0" class="flex justify-center font-sm"
					@click="searchAll(item.Column_Id,item.Column_Name)">查看全部</view>
			</view>
			<!-- 最下面广告 -->
			<view class="xpy" v-if="screenWidth<480">
				<view class="w-100 mt-1 mb-2" style="height: 200rpx;">
					<!-- 广告图龙江好物优选 -->
					<image :src="Domain_ICON+'/dbgg.webp'" class="img" alt=""></image>
				</view>
			</view>
			<!-- 底部赞助信息 -->
			<botSponsor></botSponsor>
			<!-- 逛一逛+返回顶部按钮 -->
			<view class="position-fixed bkTop" v-if="gyg_bgTop">
				<!-- 逛一逛 -->
				<view class="top mb-3" @click="()=>{this.gyg=!this.gyg}" v-if="0">
					<image :src="Domain_ICON+'/gyg.png'" mode="" class="img"></image>
				</view>
				<!-- 返回顶部 -->
				<view class="bot flex justify-center align-center" @click="backTop()" v-if="point">
					<view class="" style="width: 50rpx;height: 50rpx;">
						<image :src="Domain_ICON+'/bkTop.png'" mode="" class="img"></image>
					</view>
				</view>
			</view>
			<!-- 底部tab栏组件 -->
			<tabsBottom :tabId="0" v-if="point"></tabsBottom>
		</scroll-view>
		<view @click="()=>{isQr = false,Qr = ''}" class="mask flex justify-center align-center QR" style="background-color: rgb(0, 0, 0,0.8);" v-if="isQr">
			<view class="p-2 bg-white" style="position: relative;">
				<view class="flex justify-center">
					<text class="fout">扫一扫</text>
				</view>
	<!-- 			<view style="position: absolute; right: 0; top: 0;">
					<text class="fout-sm">关闭</text>
				</view> -->
				<view class="flex justify-center" style="width: 300px;">
					<Qrcode ref="qrcode" onval :val="Qr" :size="300" :load-make="true" :show-loading="false" />
				</view>
			<!-- 	<view>
					<Qrcode ref="qrcode" cpSize="150" onval :val="Qr" :size="300" :load-make="true" :show-loading="false" />
				</view> -->
			</view>
			
		</view>
		<!-- 逛一逛弹窗 -->
		<popUp ref="popup" type="top" :show='gyg' @Close="()=>{this.gyg=!this.gyg}" title="商品橱窗" Height="80"
			v-if="point">
			<!-- 店铺热榜 -->
			<view class="px-2 bg-white" style="">
				<view class="title flex justify-between align-center py-2">
					<view class="left flex align-center">
						<view class="" style="width: 50rpx; height: 50rpx;">
							<image :src="Domain_ICON+'/coin.webp'" mode="" class="img"></image>
						</view>
						<view class="">
							店铺热榜
						</view>
					</view>
					<!-- <view class="right font-sm " style="color: #999;">
							查看更多
							<uni-icons type="right" size="15" color="#999"></uni-icons>
						</view> -->
				</view>
				<scroll-view class="scroll-view_H" scroll-x="true" scroll-left="0" show-scrollbar v-if="point">
					<view class="sign_row flex flex-nowrap">
						<!-- 循环生成两个商品数据 -->
						<view class="bg-white mb-3 mr-3 rounded-lg overflow-hidden flex-shrink"
							v-for="(item,index) in goods.slice(0,5)" :key="index" style="width: 330rpx">
							<!-- 商品图片 -->
							<view class="w-100" style="height: 250rpx;"
								@click="productClick(item.Article_Name,item.Article_SerialNumber,item.Sales_Unit_Price_SerialNumber,item.Store_SerialNumber,item.ShopColumn_Id)">
								<image :src="Domain_IMG+item.Picture_URL" mode="aspectFit" :alt="item.name" class="img">
								</image>
							</view>
							<view class="px-2 font-sm">
								<!-- 商品名 -->
								<view class="product-name pt-2  text-ellipsis" v-if="item.remark">
									{{item.remark}}
								</view>
								<view class="flex justify-between py-3 mt-2">
									<!-- 商品价格 -->
									<money :money="item.Sales_Unit_Price"></money>
								</view>
							</view>
						</view>
						<!-- 商品最后面,查看更多 -->
						<!-- <view class="flex flex-column justify-center align-center font-sm flex-shrink"
								style="width: 330rpx;height:310rpx;background-color: #ccc;">
								<view class="rounded-circle flex flex-column justify-center align-center"
									style="width: 40rpx;height: 40rpx;background-color: #aaa;">
									<uni-icons type="right" size="12" color="#fff"></uni-icons>
								</view>
								<text class="mt-1" style="color: #aaa;">查看更多</text>
							</view> -->
					</view>
				</scroll-view>
			</view>
			<!-- 为你推荐 -->
			<view class="px-2 bg-white" style="">
				<view class="title flex justify-between align-center py-2">
					<view class="left flex align-center">
						<view class="" style="width: 50rpx; height: 50rpx;">
							<image :src="Domain_ICON+'/coin.webp'" mode="" class="img"></image>
						</view>
						<view class="">
							为你推荐
						</view>
					</view>
					<!-- <view class="right font-sm " style="color: #999;">
							查看更多
							<uni-icons type="right" size="15" color="#999"></uni-icons>
						</view> -->
				</view>
				<scroll-view class="scroll-view_H" scroll-x="true" scroll-left="0" show-scrollbar="true">
					<view class="sign_row flex flex-nowrap">
						<!-- 循环生成两个商品数据 -->
						<view class="bg-white mb-3 mr-3 rounded-lg overflow-hidden flex-shrink"
							v-for="(item,index) in goods.slice(3,6)" :key="index" style="width: 330rpx"
							@click="productClick(item.Article_Name,item.Article_SerialNumber,item.Sales_Unit_Price_SerialNumber,item.Store_SerialNumber,item.ShopColumn_Id)">
							<!-- 商品图片 -->
							<view class="w-100" style="height: 250rpx;">
								<image :src="Domain_IMG+item.Picture_URL" mode="aspectFit" :alt="item.name" class="img">
								</image>
							</view>
							<view class="px-2 font-sm">
								<!-- 商品名 -->
								<view class="product-name pt-2  text-ellipsis" v-if="item.remark">
									{{item.remark}}
								</view>
								<view class="flex justify-between py-3 mt-2">
									<!-- 商品价格 -->
									<money :money="item.Sales_Unit_Price"></money>
								</view>
							</view>
						</view>
						<!-- 商品最后面,查看更多 -->
						<!-- <view class="flex flex-column justify-center align-center font-sm flex-shrink"
								style="width: 330rpx;height:310rpx;background-color: #ccc;">
								<view class="rounded-circle flex flex-column justify-center align-center"
									style="width: 40rpx;height: 40rpx;background-color: #aaa;">
									<uni-icons type="right" size="12" color="#fff"></uni-icons>
								</view>
								<text class="mt-1" style="color: #aaa;">查看更多</text>
							</view> -->
					</view>
				</scroll-view>
			</view>
			<!-- 历史足迹 -->
			<view class="px-2 bg-white" style="">
				<view class="title flex justify-between align-center py-2">
					<view class="left flex align-center">
						<view class="" style="width: 50rpx; height: 50rpx;">
							<image :src="Domain_ICON+'/coin.webp'" mode="" class="img"></image>
						</view>
						<view class="">
							历史数据
						</view>
					</view>
					<!-- <view class="right font-sm " style="color: #999;">
							查看更多
							<uni-icons type="right" size="15" color="#999"></uni-icons>
						</view> -->
				</view>
				<scroll-view class="scroll-view_H" scroll-x="true" scroll-left="0" show-scrollbar="false"
					enhanced="true">
					<view class="sign_row flex flex-nowrap">
						<!-- 循环生成两个商品数据 -->
						<view class="bg-white mb-3 mr-3 rounded-lg overflow-hidden flex-shrink"
							v-for="(item,index) in goods.slice(4,7)" :key="index" style="width: 330rpx"
							@click="productClick(item.Article_Name,item.Article_SerialNumber,item.Sales_Unit_Price_SerialNumber,item.Store_SerialNumber,item.ShopColumn_Id)">
							<view class="w-100" style="height: 250rpx;">
								<image :src="Domain_IMG+item.Picture_URL" mode="aspectFit" :alt="item.name" class="img">
								</image>
							</view>
							<view class="px-2 font-sm">
								<!-- 商品名 -->
								<view class="product-name pt-2  text-ellipsis" v-if="item.remark">
									{{item.remark}}
								</view>
								<view class="flex justify-between py-3 mt-2">
									<!-- 商品价格 -->
									<money :money="item.Sales_Unit_Price"></money>
								</view>
							</view>
						</view>
						<!-- 商品最后面,查看更多 -->
						<!-- <view class="flex flex-column justify-center align-center font-sm flex-shrink"
								style="width: 330rpx;height:310rpx;background-color: #ccc;">
								<view class="rounded-circle flex flex-column justify-center align-center"
									style="width: 40rpx;height: 40rpx;background-color: #aaa;">
									<uni-icons type="right" size="12" color="#fff"></uni-icons>
								</view>
								<text class="mt-1" style="color: #aaa;">查看更多</text>
							</view> -->
					</view>
				</scroll-view>
			</view>
		</popUp>
		<!-- 购物车弹窗 -->
		<popUp type="top" bgColor="#fff" :show='shopcart' @Close="()=>{shopcart=false}" Height="70">
			<view class="shopcart flex ml-3" style="width: 70%;">
				<view class="getValue" :data-Article_SerialNumber="good.Article_SerialNumber"
					:data-quantity="good.quantity"
					:data-Unit_Price="good.specifications[0]?good.specifications[0].Unit_Price:''">
				</view>
				<!-- <view class="get_samevalue"
						:data-Sales_Unit_Price_Stock_SerialNumber="good.Sales_Unit_Price_Stock_SerialNumber">
	
					</view> -->
				<view class="py-3" style="width:270rpx;height: 270rpx;">
					<image :src="Domain_IMG+good.Picture_URL" mode="aspectFit" class="img"></image>
				</view>
				<!-- 商品规格只有一个时 -->
				<view class="ml-2 flex flex-column justify-end pb-4" style="width: 200rpx;"
					v-if="good.hasOwnProperty('specifications')&&good.specifications.length==1">
					<money :money="good.Sales_Unit_Price"></money>
					<view class="font-sm" style="color: #ccc;">
						<text>剩余{{good.specifications[0].Stock_Remain}}件</text>
					</view>
				</view>
				<!-- 商品规格大于一个时 -->
				<view class="ml-2 flex flex-column justify-end pb-4" style="width: 200rpx;"
					v-if="good.hasOwnProperty('specifications')&&good.specifications.length>1">
					<!-- 未选中时显示 -->
					<view class="" v-if="JSON.stringify(selectSpe)=='{}'">
						<view class="flex">
							<money :money="minPrice"></money>-
							<money :money="maxPrice"></money>
						</view>

						<view class="font-sm" style="color: #ccc;">
							<text>剩余{{totalRemain}}件</text>
						</view>
						<view class="font-sm" style="color: #ccc;">
							<text>请选择 购买规格</text>
						</view>
					</view>
					<!-- 选中时显示 -->
					<view class="" v-else>
						<money :money="selectSpe.Sales_Unit_Price"></money>
						<view class="font-sm" style="color: #ccc;">
							<text>剩余{{selectSpe?selectSpe.Stock_Remain:''}}件</text>
						</view>
						<view class="font-sm" style="color: #ccc;">
							<text>已选 {{selectSpe.Specifications_Name}}</text>
						</view>
					</view>
				</view>
			</view>
			<view class="flex flex-column mx-3"
				v-if="good.hasOwnProperty('specifications')&&good.specifications.length>1">
				<view class="">
					购买规格
				</view>
				<view class="flex">
					<view class="mr-2 rounded-lg flex justify-center align-center" :class="{'speActive':item.isSelect}"
						@click="speClick(item,index)" v-for="(item,index) in good.specifications" :key="index"
						style="background-color: rgb(247,248,250);width: 130rpx;height: 60rpx;">
						<view>
							{{item.Specifications_Name}}
						</view>
					</view>
				</view>
			</view>
			<view class="flex justify-between mx-3 mt-3">
				<view class="font">购买数量</view>
				<view class="" v-if="good.quantity&&good.specifications.length>0">
					<counter :num="Number(good.quantity)" :max="Number(good.specifications[0]?good.specifications[0].Stock_Remain:'')" @Count="counterClick"></counter>
				</view>
			</view>
			<view class="shop-cart position-fixed flex justify-center font text-white "
				style=" bottom:20rpx; margin:0 auto">
				<button class="btn-left text-white" :disabled="loading" @click="addCart()">加入购物车</button>
				<button class="btn-right text-white" @click="buyNow()">立即购买</button>
			</view>
		</popUp>
		<!-- 优惠券领取弹窗 -->
	</view>
</template>

<script>
	const app = getApp();
	import {
		getJson
	} from "@/api/global.js";
	import Qrcode from "@/components/qrcode/qrcode.vue"
	import tabsTop from "@/components/tabs/tabs-top.vue";
	import tabsBottom from "@/components/tabs/tabs-bottom.vue";
	import mySearch from "@/components/mysearch/mysearch.vue";
	import botSponsor from "@/components/botsponsor/sponsor.vue"
	import popUp from "@/components/tabs/pop-up.vue"
	import money from "@/components/tool/money.vue"
	import counter from "@/components/tool/counter.vue"
	import coupon from "@/components/tool/coupon.vue"
	import loginPC from "@/components/loginPC.vue"
	import yHeader from "@/components/yHeader.vue"
	import {
		getWXCarouselChartAction,
		getWX2ColumnAction,
		getWXColumnMainAction,
		getWX2GoodsIdAction
	} from "@/api/index.js"
	import {
		getWXCheckShopCarAction,
		editWXEditShopCarQuantity,
		getWX2CheckStockAction,
		getColumn_GoodsAll,
		getWX4GoodsIdAction,
	} from "@/api/article.js"
	import {
		accMul,
		accAdd
	} from "@/static/js/GeneralUtil.js"
	import {
		getAddAction,
	} from "@/api/global.js"
	import {
		getqueryCollectTodayCouponAction,
		getreceiveCouponAction
	} from "@/api/coupon.js"
	import {
		NowTime
	} from "@/static/js/DateUtil.js"
	import {
		stringify
	} from "querystring";
	import {salesOrderSaveAction} from "@/api/pay.js"
	import {
		GetChengXu,
	} from "@/api/global.js"
	export default {
		components: {
			tabsTop, //顶部标题组件
			tabsBottom, //底部tab组件
			mySearch, // 搜索组件
			botSponsor, // 底部赞助商
			popUp,
			money,
			counter,
			coupon,
			loginPC,
			yHeader,
			Qrcode
		},
		data() {
			return {
				point: false, //判断
				test: false,
				scrollTop: 0, // 页面位置
				old: {
					scrollTop: 0
				},
				isLogin: true,
				screenWidth: uni.getSystemInfoSync().windowWidth,
				Domain_IMG: app.globalData.Domain_IMG,
				Domain_ICON: app.globalData.Domain_ICON, //图标域名
				lb_Src: [], //轮播图图片路径
				indicatorDots: true, // 指示点
				autoplay: true, // 自动播放
				interval: 3000, //   幻灯片切换时长
				duration: 1000, //  自动播放时长 
				dh_Icons: [], // 轮播图下方页面导航,
				columns: [], // 栏目   
				dztj: [], // 店长推荐中的商品
				hwyx: [],
				goods: [], // 好物优选
				goodslen: '', // 每次获得到的商品长度
				Qr:'',
				isQr:false,
				good: {
					specifications: []
				}, // 点击单个商品获取商品信息
				selectIndex: '', //当前选中商品的索引
				totalRemain: 0, // 未选中时所有商品的总剩余   
				minPrice: 0, // 规格中价格最小
				maxPrice: 0, // 规格中价格最大
				selectSpe: {}, // 选中的规格
				shopcart: false, // 购物车弹窗是否显示
				mrtj: "每日推荐",
				// 每日推荐选项卡
				scrollAreaLeft: 0,
				scrollAreaWidth: 0,
				tabItemList: [],
				scrollToLeft: 0,
				tabIndex: 0,
				/* 选中标签栏的序列,默认显示第一个 */
				contentList: [
					"销量榜",
					"人气榜",
					"新品榜",
				],
				tabBars: [{
						name: '销量榜',
						id: '0'
					},
					{
						name: '人气榜',
						id: '1'
					},
					{
						name: '新品榜',
						id: '2'
					}
				],
				xlb: [], // 销量榜
				rqb: [], // 人气榜
				xpb: [], //新品榜
				gyg_bgTop: true, // 逛一逛和返回顶部是否显示
				gyg: false, //  逛一逛弹窗是否显示
				storeList: [], //店铺热榜
				recommended: [], //为你推荐
				historuFoot: [], //历史足迹
				canshu: { // 每次查询需要带的参数
					App_ID: app.globalData.App_ID,
					Enterprise_Info_SerialNumber: app.globalData.Enterprise_Info_SerialNumber
				},
				flag: "true",
				num: uni.getSystemInfoSync().windowWidth > 480 ? 300 : 1200, // 到当前位置滚轮刷新
				page: 1, // 商品页数
				limit: 7, // 每次刷新的条数

				//  优惠券数据
				couponArr: [],
				topImages: 'http://m.qpic.cn/psc?/V14ZaBeY40XWC8/zkoezU7GGNbZGOF.DPhgQVgKh0Fw63ZhFQsd0hetQ8T6CBTPzbnz3dz1WfeDXiG6wY3NwfQcy1Y7Ry49HK1QdM9SKG1QzVXMBdXM0bH80fc!/b&bo=nQLyAJ0C8gADCSw!&rf=viewer_4',
				couponLeftImages: 'http://m.qpic.cn/psc?/V14ZaBeY40XWC8/zkoezU7GGNbZGOF.DPhgQXDCLspq1L1upRR.ZiRnZuFvq1XezxpUwmIc4ky9cr0DEpxn.YXOFA15Y03Wwkk2zJSBTVERFZsf3KTl5vSZorE!/b&bo=lgCWAJYAlgADCSw!&rf=viewer_4',
				closeBtnImages: 'http://m.qpic.cn/psc?/V14ZaBeY40XWC8/zkoezU7GGNbZGOF.DPhgQZjV2a5npNMM5D47K1jMLBHO3ccXXkEwsTHa*69Gi8pCGkdmz4imEISAR0fRbZj7*malDMMANN7ZzH8oI6XDWDk!/b&bo=QABAAEAAQAADCSw!&rf=viewer_4',
				// 是否显示优惠劵弹窗
				isShowCouponPopUp: false,
				loading: false, // 节流
				jifen: [],
				shopInfo: {}, // 商城个人信息
				// environmentStatus:'',// 判断当前是小程序还是PC
			}
		},
		onLoad(option) {
			// //console.log('点击了积分商城', JSON.parse(option.loginInfo).Member_SerialNumber)
			this.good.quantity = 1;
			if (option.hasOwnProperty('loginInfo')) {
				this.shopInfo = option.loginInfo;
			}
			this.getLb();
			this.getNav();
			// this.getColumns();
			if (option.param === 'point') {
				this.point = false
				//console.log('进入', this.point)
				this.getPoint()
			} else {
				this.point = true
				this.getColumn_GoodsAll();
			}
			this.getHwyxGoods();
			this.getqueryCollectTodayCouponAction();
		},
		methods: {
			async WeChat(){
				//console.log(11);
				const data = await GetChengXu()
				if(data){
					if(this.screenWidth < 480){
						window.location.href = 'https://marketing.xiaokanglongjiang.com/dist/h5XKLJ/htmlpage/WeChat.html?Path=0'
					}else{
						this.Qr = 'https://marketing.xiaokanglongjiang.com/dist/h5XKLJ/htmlpage/WeChat.html?Path=0'
						this.isQr = true;
					}	
				}
				
			},
			async getColumn_GoodsAll() {
				let res = await getColumn_GoodsAll({
					Enterprise_Info_SerialNumber: app.globalData.Enterprise_Info_SerialNumber,
					Open_ID: app.globalData.Open_ID,
					App_ID: app.globalData.App_ID,
					limit: this.screenWidth > 480 ? 28 : 10,
				})
				//console.log('首页进入', res)
				if (res.Status == 'success') {
					// //console.log(res.Data);
					this.columns = res.Data
					//console.log(this.columns, '商城');
				}
			},
			// 积分商城
			async getPoint() {
				const _this = this
				let res = await getJson("https://marketing.xiaokanglongjiang.com/jifen_text.json")
				_this.jifen = res.Data
				//console.log('积分商城', res)
				_this.columns = _this.jifen
			},
			// 轮播图接口
			async getLb() {
				var res = await getWXCarouselChartAction(this.canshu);
				if (res.length > 0) {
					this.lb_Src = res
				}
				//console.log(this.lb_Src, '轮播图');
			},
			// 紧挨着轮播图导航的接口
			async getNav() {
				var res = await getWX2ColumnAction(this.canshu);
				if (res.length > 0) {
					this.dh_Icons = res;
				}
				//console.log(res, '导航模块');
			},
			// 栏目
			async getColumns() {
				var res = await getWXColumnMainAction(this.canshu);
				if (res.Status == 'success') {
					this.columns = res.Data;
				}
				if (res.Data[0].Column_Name == "店长推荐") {
					const dztjres = await this.getGoods(res.Data[0].Column_Id)
					this.dztj = dztjres.tableData;
					this.dztj.reverse()
				}
			},
			// 好物优选的商品查询
			async getHwyxGoods() {
				const res = await this.getGoods('C10000000000002');
				this.goods = [...this.goods, ...res.tableData]
				//console.log(this.goods);
				this.goodslen = this.goods.length;
			},
			// 商品查询
			async getGoods(Id) {
				var canshu = {
					...this.canshu
				};
				canshu.ShopColumn_Id = Id;
				canshu.page = this.page;
				canshu.limit = this.limit;
				const res = await getWX2GoodsIdAction(canshu);
				if (res.Status = 'success') {
					return res;
				};
			},
			// 可领取优惠券查询
			async getqueryCollectTodayCouponAction() {
				var canshu = {
					...this.canshu
				};
				canshu.Open_ID = app.globalData.Open_ID;
				var res = await getqueryCollectTodayCouponAction(canshu);
				if (res.Status == 'success') {
					this.couponArr = res.Data;
					if (this.couponArr.length == 0) {
						this.isShowCouponPopUp = true;
					} else {
						this.isShowCouponPopUp = false;
					}
				}
			},
			// 领取优惠券接口
			async getreceiveCouponAction() {
				var canshu = {
					...this.canshu
				};
				canshu.Open_ID = app.globalData.Open_ID;
				canshu.Coupon_Scheme_SerialNumber = []
				for (var i = 0; i < this.couponArr.length; i++) {
					canshu.Coupon_Scheme_SerialNumber.push(this.couponArr[i].Coupon_Scheme_SerialNumber)
				}
				canshu.Coupon_Scheme_SerialNumber = JSON.stringify(canshu.Coupon_Scheme_SerialNumber)
				uni.showLoading({
					title: "加载中...",
				});
				this.loading = true;
				var res = await getreceiveCouponAction(canshu);
				this.isShowCouponPopUp = !this.isShowCouponPopUp;
				uni.hideLoading();
				this.loading = false;
			},
			// 加入购物车接口
			// async getGoods(page, limit) {
			// 	var canshu = {
			// 		...this.canshu
			// 	};
			// 	canshu.ShopColumn_Id = 'C10000000000002';
			// 	canshu.page = page;
			// 	canshu.limit = limit;
			// 	var res = await getWX2GoodsIdAction(canshu);
			// 	if (res.Status = 'success') {
			// 		for (var i = 0; i < res.tableData.length; i++) {
			// 			this.goods.push(res.tableData[i]);
			// 		}
			// 		this.goodslen = res.tableData.limit;
			// 	};

			// },
			// 打开购物车弹窗
			async shopCart(item) {
				const data = await GetChengXu()
				if(app.globalData.isPC){
					// if(this.screenWidth < 480){
						window.location.href =app.globalData.Domain_Url+ `#/pages/detail/supply-detail?id=${encodeURIComponent(
							item.Article_SerialNumber)}&ShopColumn_Id=${encodeURIComponent(item.ShopColumn_Id)}&shop_good=${"shop_good"}`
				}else{
					this.totalRemain = 0;
					this.loading = false;
					this.good = {
						...item
					}
					const res = await getWX4GoodsIdAction({
						ShopColumn_Id: item.ShopColumn_Id,
						Article_SerialNumber: item.Article_SerialNumber,
						Enterprise_Info_SerialNumber: item.Enterprise_Info_SerialNumber,
						Open_ID: app.globalData.Open_ID
					})
					// if(res.Data[0].hasOwnProperty('Children')){
					// 	this.good.specifications.forEach((item,index)=>{
					// 		this.good.specifications[index].Children={
					// 			Gifts:[],
					// 		}
					// 		this.good.specifications[index].Children.Gifts=res.Data[index].Children.Gifts
						
					// 	})
					// }
					//console.log('加入购物车', item)
					this.$set(this.good, "specifications", res.Data)
					this.$set(this.good, "quantity", 1)
					//console.log(this.good, '商品信息');
					this.minPrice = res.Data[0].Sales_Unit_Price
					this.maxPrice = res.Data[0].Sales_Unit_Price
					this.good.specifications.forEach((item, index) => {
						item.isSelect = false;
						this.totalRemain += item.Stock_Remain * 1;
						if (item.Sales_Unit_Price > this.maxPrice) {
							this.maxPrice = item.Sales_Unit_Price
						}
						if (item.Sales_Unit_Price < this.minPrice) {
							this.minPrice = item.Sales_Unit_Price
						}
					})
					// 传入需要拿到数据的选择器
					// this.getvalues('.getValue');
					this.shopcart = !this.shopcart;
				}
			},
			speClick(item, index) {
				if (item.isSelect == false) {
					this.good.specifications.forEach(item => {
						this.$set(item, 'isSelect', false)
						// item.isSelect=false
					})
					this.$set(this.good.specifications[index], 'isSelect', !this.good.specifications[index].isSelect)
					//console.log(this.good.specifications[index].isSelect);
					this.selectSpe = {
						...item
					}
					this.selectIndex = index
					//console.log(item, '选中的规格');
				} else {
					this.$set(this.good.specifications[index], 'isSelect', !this.good.specifications[index].isSelect)
					this.selectSpe = {}
					this.selectIndex = ''
					//console.log('置空');
				}
			},
			upper(e) { // 滚动触顶
				//console.log(1)
			},
			lower(e) { // 滚动触底
				//console.log(2)
			},
			scroll(e) { // 滚动时就会触发
				if (e.detail.scrollTop > this.old.scrollTop) {
					this.gyg_bgTop = false;
				} else {
					this.gyg_bgTop = true;
				}
				// //console.log(this.num);
				this.old.scrollTop = e.detail.scrollTop;
				if (this.flag && e.detail.scrollTop > this.num) {
					this.num += 200;
					this.getHwyxGoods();
					this.page += 1;
					if (this.goodslen == this.goods.length) {
						this.flag = false;
					}
				}
			},
			counterClick(e) {
				this.good.quantity = e;
			},
			searchClick() {
				// 点击搜索进入搜索页
				uni.navigateTo({
					//搜索页路径
					url: "./search",
				});
			},
			// 点击轮播图跳转界面
			handleSwiper(url, Carousel_Chart_Name, ShopColumn_Id) {
				if (Carousel_Chart_Name != "乡村振兴") {
					uni.navigateTo({
						//搜索页路径
						url: url + "?ShopColumn_Id=" + ShopColumn_Id + '&json_url=' + 'hmgx/shopLbjson.json',
					});
				}
			},
			// 导航跳转
			navClick(url, ShopColumn_Id, Carousel_Chart_Name) {
				if (Carousel_Chart_Name != "冷调特区") {
					uni.navigateTo({
						url: url + '?ShopColumn_Id=' + ShopColumn_Id + '&json_url=' + 'hmgx/shopLbjson.json',
					})
				}
			},
			// 点击商品,进入商品详情页
			async productClick(name, Article_SerialNumber, Sales_Unit_Price_SerialNumber, Store_SerialNumber, ShopColumn_Id) {
				const data = await GetChengXu()
				if(app.globalData.isPC){
					// if(this.screenWidth < 480){
						window.location.href =app.globalData.Domain_Url+ `#/pages/detail/supply-detail?id=${encodeURIComponent(
							Article_SerialNumber)}&ShopColumn_Id=${encodeURIComponent(ShopColumn_Id)}&shop_good=${"shop_good"}`
					// }else{
					// 	this.Qr = 'https://marketing.xiaokanglongjiang.com/dist/h5XKLJ/htmlpage/WeChat.html?Path=1&name='+ name + "&Article_SerialNumber=" +
					// 			Article_SerialNumber + "&Sales_Unit_Price_SerialNumber=" +
					// 			Sales_Unit_Price_SerialNumber +
					// 			"&Store_SerialNumber=" + Store_SerialNumber + '&ShopColumn_Id=' + ShopColumn_Id
					// 	this.isQr = true;
					// }	
				}else{
					if (this.screenWidth > 480) {
						// https://marketing.ediblefungus.cn/dist/h5XKLJ/index.html/
						// http://localhost:8080/dist/h5XKLJ/
						
						window.location.href = app.globalData.Domain_Url + `#/pages/detail/supply-detail?id=${encodeURIComponent(
							Article_SerialNumber)}&ShopColumn_Id=${encodeURIComponent(ShopColumn_Id)}&shop_good=${"shop_good"}`
					} else {
						uni.navigateTo({
							url: "/pages/index/productDetails?name=" + name + "&Article_SerialNumber=" +
								Article_SerialNumber + "&Sales_Unit_Price_SerialNumber=" +
								Sales_Unit_Price_SerialNumber +
								"&Store_SerialNumber=" + Store_SerialNumber + '&ShopColumn_Id=' + ShopColumn_Id
						})
					}
				}
			},
			//切换选项卡
			toggleTab(index) {
				this.tabIndex = index;
			},
			// 查看全部
			searchAll(Column_Id, Column_Name) {
				uni.navigateTo({
					url: "/pages/index/Column_Article?Column_Id=" + Column_Id + "&Column_Name=" + Column_Name
				})
			},
			//滑动切换swiper
			tabChange(e) {
				this.tabIndex = e.detail.current;
			},
			backTop() {
				this.scrollTop = this.old.scrollTop
				this.$nextTick(function() {
					this.scrollTop = 0
				});
			},
			//阻止弹出层滑动事件，空函数，不做任何处理
			onPreventTouchMove: function() {
				return false;
			},
			//关闭优惠劵弹窗
			closeTheCouponPopUp: function() {
				// 设置优惠劵弹窗关闭动画
				var animation = uni.createAnimation({
					duration: 3000,
					timingFunction: 'ease',
				})
				this.animation = animation;
				animation.scale(0).step(3);
				this.animationData = animation.export(),

				//执行完动画后再关闭
				setTimeout(() => {
					this.isShowCouponPopUp = true
				}, 200)
			},
			//领取单个优惠劵
			getCoupons: function(e) {
				var index = e.currentTarget.dataset.index;
				var couponArr = this.couponArr;
				couponArr[index].HasItBeenClaimed = true;
				this.couponArr = couponArr
			},
			//已领取优惠劵
			alreadyReceived: function() {
				uni.showToast({
					title: '已领取，可在卡包查看',
					icon: 'none'
				})
			},
			// 获取表中数据
			getvalues(selector) {
				const query = uni.createSelectorQuery();
				var ele = query.selectAll(selector);

				ele.fields({
					dataset: true,
					computedStyle: true,
					context: true
				}, (e) => { //   拿到节点中想要的键值对信息
					//console.log(e);
				}).exec()

			},
			// 购物车中立即购买
			buyNow() {
				if (this.good.specifications.length > 1) {
					if (Object.keys(this.selectSpe).length <= 0) {
						uni.showToast({
							title: '请选择规格',
							icon: "error",
							duration: 1200
						})
						return;
					}
				} else {
					this.selectIndex = 0
				}
				if (this.good.quantity > 0) {

				} else {
					this.good.quantity = 1;
				}
				let Article = {
					Article_Name: this.good.Article_Name,
					Store_SerialNumber: this.good.Store_SerialNumber,
					Category_Name: "普通实物商品",
					Article_SerialNumber: this.good.specifications[this.selectIndex].Article_SerialNumber,
					Picture_URL: this.good.Picture_URL,
					Article_Specifications_SerialNumber: this.good.specifications[this.selectIndex].Article_Specifications_SerialNumber,
					Sales_Unit_Price_Detail_SerialNumber: this.good.specifications[this.selectIndex].Sales_Unit_Price_Stock_SerialNumber,
					Sales_Unit_Price: this.good.specifications[this.selectIndex].Sales_Unit_Price,
					Sales_Unit_Price_Stock_SerialNumber: this.good.specifications[this.selectIndex]
						.Sales_Unit_Price_Detail_SerialNumber,
					Sign: this.good.specifications[this.selectIndex].Sign,
					Stock_Remain: this.good.specifications[this.selectIndex].Stock_Remain,
					Stock_Sell: this.good.specifications[this.selectIndex].Stock_Sell,
					Quantity: this.good.quantity,
					Unit_Price: this.good.specifications[this.selectIndex].Unit_Price,
					Gifts: this.good.specifications[this.selectIndex].Children.Gifts
				}
				//console.log(this.good);
				uni.navigateTo({
					url: "/pages/index/submitOrder?good=" + encodeURIComponent(JSON.stringify([Article]))
				})
			},
			//领取全部优惠劵
			getAllCoupons: function() {
				var res = this.getreceiveCouponAction();
				uni.showToast({
					title: '领取成功，已放入卡包',
					icon: 'none'
				})
			},
			// 判断购物车有无相同商品
			async getWXCheckShopCarAction(Sales_Unit_Price_Stock_SerialNumber,Article_SerialNumber) {
				var res = await getWXCheckShopCarAction({
					App_ID: app.globalData.App_ID,
					Open_ID: app.globalData.Open_ID,
					Sales_Unit_Price_Stock_SerialNumber,
					Article_SerialNumber
				})
				return res;
			},
			// 加入购物车
			async addCart() {
				if (this.good.specifications.length > 1) {
					if (Object.keys(this.selectSpe).length <= 0) {
						uni.showToast({
							title: '请选择规格',
							icon: 'error',
							duration: 1200
						})
						return;
					}
				}
				// //console.log(this.good.specifications[0].Sales_Unit_Price_Stock_SerialNumber, '要添加到购物的');
				this.loading = true;
				if (!this.good.quantity) {
					this.good.quantity = 1
				}
				let index = 0;
				this.good.specifications.forEach((item, index1) => {
					if (item.isSelect) {
						//console.log(item, index, '看下都变没变');
						index = index1;
					}
				})
				// //console.log(this.good,'看看index');
				// 根据每个里的isSelect选中状态判断
				let time = new Date().getTime();
				var sales_order = {
					Sales_Order_SerialNumber: app.globalData.Open_ID+'_'+ time,
					Store_SerialNumber: this.good.Store_SerialNumber,
					Sales_Address: '',
					Sales_Contacts: '',
					Sales_Phone: '',
					Sales_Message: '',
					Sales_Date: NowTime(),
					Open_ID: app.globalData.Open_ID,
					Tourist_Code:'',
					App_ID: app.globalData.App_ID,
					Sales_Amount: accMul(this.good.quantity,this.good.specifications[index].Sales_Unit_Price),
					Collection_Amount: 0,
					Delivery_Amount: 0,
					Receive_Type: 0,
					Refund_Type: 0,
					Enterprise_Info_SerialNumber: app.globalData.Enterprise_Info_SerialNumber,
					Row_Status: 8,
					Children: {
						sales_order_detail: [{
							Sales_Order_Detail_SerialNumber: app.globalData.Open_ID+'_'+ time +'_001',
							Sales_Order_SerialNumber: app.globalData.Open_ID+'_'+ time,
							Sales_Unit_Price_Stock_SerialNumber: this.good.specifications[index].Sales_Unit_Price_Detail_SerialNumber,
							Sales_Unit_Price_Detail_SerialNumber: this.good.specifications[index].Sales_Unit_Price_Stock_SerialNumber,
							Article_SerialNumber: this.good.specifications[index].Article_SerialNumber,
							Article_Specifications_SerialNumber: this.good.specifications[index]
								.Article_Specifications_SerialNumber,
							Sign: this.good.specifications[index].Sign,
							Quantity: this.good.quantity,
							Unit_Price: this.good.specifications[index].Unit_Price,
							Sales_Unit_Price: this.good.specifications[index].Sales_Unit_Price,
							Enterprise_Info_SerialNumber: app.globalData.Enterprise_Info_SerialNumber,
							Amount: accMul(this.good.quantity,this.good.specifications[index].Sales_Unit_Price),
							Row_Status: 8,
							Receive_Type: 0,
							Refund_Type: 0,
						}]
					}
				}
				if (app.globalData.Open_ID == '') {
					sales_order.Tourist_Code = app.globalData.Tourist_Code
				} else {
					sales_order.Open_ID = app.globalData.Open_ID
				}
				// 看下当前商品是否有赠品
				// if (this.good.specifications[index].Children.Gifts.length > 0) {
				// 	this.good.specifications[index].Children.Gifts.forEach(item => {
				// 		item.Order_Type = 1
				// 		item.Amount = accMul(item.Quantity, item.Sales_Unit_Price)
				// 	})
				// 	this.good.specifications[index].Children
				// 		.Gifts.forEach((item, index) => {
				// 			sales_order.Children.sales_order_detail.push(item)
				// 		})
				// }
				// //console.log(sales_order,'看看规格变没变');
				var res = await this.getWXCheckShopCarAction(this.good.specifications[index]
					.Sales_Unit_Price_Stock_SerialNumber,this.good.specifications[index]
					.Article_SerialNumber);
				//console.log(res, "查询是否有相同商品");
				if (res.length == 0) {
					// 增加流程
					sales_order.Children.sales_order_detail[0].Amount = accMul(this.good.specifications[index]
						.Sales_Unit_Price, this.good.quantity)
					uni.showLoading({
						title: "加载中...",
					});
					var addres = await getAddAction({
						Data: JSON.stringify({
							sales_order: [sales_order]
						}),
						Open_ID: app.globalData.Open_ID
					})
					uni.hideLoading();
					if (addres.Status == "success") {
						uni.showToast({
							title: '提交成功！',
							icon: 'success'
						})
						const timer = setTimeout(() => {
							clearTimeout(timer)
							this.shopcart = false;
						}, 500)
					} else {
						uni.showToast({
							title: '提交失败！',
							icon: 'error'
						})
					}
				} else {
					uni.showLoading({
						title: "加载中...",
					});
					// 修改购物车商品数量   有问题 修改的不是当前规格的
					var editres = await editWXEditShopCarQuantity({
						Open_ID: app.globalData.Open_ID,
						Article_SerialNumber: res[0].Article_SerialNumber,
						Quantity: this.good.quantity,
						Type: "1"
					})
					uni.hideLoading();
					if (editres.Status == "success") {
						uni.showToast({
							title: '提交成功！',
							icon: 'success'
						})
						const timer = setTimeout(() => {
							clearTimeout(timer)
							this.shopcart = false;
						}, 500)
					} else {
						uni.showToast({
							title: '提交失败！',
							icon: 'error'
						})
					}
				}
			}
			// async addCart() {
			// 	if (this.good.specifications.length > 1) {
			// 		if (Object.keys(this.selectSpe).length <= 0) {
			// 			uni.showToast({
			// 				title: '请选择规格',
			// 				icon: 'error',
			// 				duration: 1200
			// 			})
			// 			return;
			// 		}
			// 	}
			// 	// //console.log(this.good.specifications[0].Sales_Unit_Price_Stock_SerialNumber, '要添加到购物的');
			// 	this.loading = true;
			// 	if (!this.good.quantity) {
			// 		this.good.quantity = 1
			// 	}
			// 	let index = 0;
			// 	this.good.specifications.forEach((item, index1) => {
			// 		if (item.isSelect) {
			// 			//console.log(item, index, '看下都变没变');
			// 			index = index1;
			// 		}
			// 	})
			// 	// //console.log(this.good,'看看index');
			// 	// 根据每个里的isSelect选中状态判断
			// 	let time = new Date().getTime()
			// 	var sales_order = {
			// 		Sales_Order_SerialNumber:app.globalData.Open_ID+'_'+ time,
			// 		Store_SerialNumber: this.good.Store_SerialNumber,
			// 		Sales_Address: '',
			// 		Sales_Contacts: '',
			// 		Sales_Phone: '',
			// 		Sales_Message: '',
			// 		Sales_Date: NowTime(),
			// 		Open_ID: app.globalData.Open_ID,
			// 		Tourist_Code:'',
			// 		App_ID: app.globalData.App_ID,
			// 		Sales_Amount: '',
			// 		Collection_Amount: 0,
			// 		Delivery_Amount: 0,
			// 		Receive_Type: 0,
			// 		Refund_Type: 0,
			// 		Enterprise_Info_SerialNumber: app.globalData.Enterprise_Info_SerialNumber,
			// 		Row_Status: 8,
			// 		Children: {
			// 			sales_order_detail: [{
			// 				Sales_Order_Detail_SerialNumber:  app.globalData.Open_ID+'_'+ time+'_001',
			// 				Sales_Order_SerialNumber: app.globalData.Open_ID+'_'+ time,
			// 				Sales_Unit_Price_Stock_SerialNumber: this.good.specifications[index]
			// 					.Sales_Unit_Price_Stock_SerialNumber,
			// 				Article_SerialNumber: this.good.Article_SerialNumber,
			// 				Article_Specifications_SerialNumber: this.good.specifications[index]
			// 					.Article_Specifications_SerialNumber,
			// 				Sign: this.good.specifications[index].Sign,
			// 				Quantity: this.good.quantity,
			// 				Unit_Price: this.good.specifications[index].Unit_Price,
			// 				Sales_Unit_Price: this.good.specifications[index].Sales_Unit_Price,
			// 				Enterprise_Info_SerialNumber: app.globalData.Enterprise_Info_SerialNumber,
			// 				Amount: '',
			// 				Row_Status: 8,
			// 				Receive_Type: 0,
			// 				Refund_Type: 0,
			// 			}]
			// 		}
			// 	}
			// 	uni.showLoading({
			// 		title: "加载中...",
			// 	});
			// 	//console.log({sales_order: [sales_order]});
			// 	var addres = await salesOrderSaveAction({
			// 		Data: JSON.stringify({
			// 			sales_order: [sales_order]
			// 		}),
			// 		OperationType:0,
			// 	})
			// 	//console.log(addres);
			// 	uni.hideLoading();
			// 	if (addres.Status == "success") {
			// 		uni.showToast({
			// 			title: '提交成功！',
			// 			icon: 'success'
			// 		})
			// 		const timer = setTimeout(() => {
			// 			clearTimeout(timer)
			// 			this.shopcart = false;
			// 		}, 500)
			// 	} else {
			// 		uni.showToast({
			// 			title: '提交失败！',
			// 			icon: 'error'
			// 		})
			// 	}
				
			// }
		}
	}
</script>

<style lang="scss">
	// 购物车选中规格时样式
	.speActive {
		background-color: rgb(230, 248, 230);
		color: green
	}


	.popover-mask-layer {
		height: 100vh;
		width: 100vw;
		background-color: rgba(0, 0, 0, 0.5);
		position: fixed;
		top: 0;
		z-index: 1002;
	}

	// 优惠券样式
	.coupon-pop-up {
		width: 100vw;
		height: 100vh;
		position: fixed;
		top: 0;
		z-index: 1003;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.coupon-pop-up .body {
		width: 650rpx;
	}

	.coupon-pop-up .top-images {
		width: 650rpx;
		height: 260rpx;
		position: relative;
	}

	.coupon-pop-up .top-images image {
		width: 100%;
		height: 100%;
		position: relative;
		z-index: 1004;
	}

	.coupon-pop-up .top-images .coupon-bg {
		position: absolute;
		height: 240rpx;
		width: 650rpx;
		z-index: 1003;
		bottom: 0;
	}

	.coupon-pop-up .mid-coupons {
		width: 650rpx;
		background-color: #E41B3F;
		border-radius: 0 0 30rpx 30rpx;
		padding: 20rpx;
		box-sizing: border-box;
		box-shadow: -5px 5px 10px -4px #222, 5px 5px 10px -4px #222;
	}

	.mid-coupons .content scroll-view {
		max-height: 510rpx;
		min-height: 340rpx;
		overflow-y: auto;
	}

	.coupon-pop-up .mid-coupons .row {
		height: 170rpx;
		padding: 20rpx 20rpx 0 20rpx;
		box-sizing: border-box;
		display: flex;
	}

	.mid-coupons {
		.bottom-get-btn {
			display: flex;
			justify-content: center;
			align-items: center;
			margin: 25rpx 0 20rpx 0;
		}
	}

	.mid-coupons {
		.bottom-get-btn view {
			width: 80%;
			height: 80rpx;
			border-radius: 80rpx;
			text-align: center;
			line-height: 80rpx;
			background-image: linear-gradient(to bottom, #FFF6D3, #DEB219);
			color: #B65023;
		}
	}

	.coupon-pop-up {
		.bottom-close-btn {
			height: 60rpx;
			display: flex;
			justify-content: center;
			align-items: center;
			margin-top: 20rpx;
		}
	}

	.coupon-pop-up {
		.bottom-close-btn-child {
			width: 70rpx;
			height: 70rpx;
			display: flex;
			justify-content: center;
			align-items: center;
			background-color: rgba(255, 255, 255, 0.8);
			border-radius: 50%;
		}
	}

	.bottom-close-btn-child {
		image {
			width: 40rpx;
			height: 40rpx;
		}
	}

	.coupon-suspension-window {
		position: fixed;
		bottom: 300rpx;
		right: 20rpx;
		width: 70rpx;
		height: 70rpx;
	}

	.coupon-suspension-window image {
		width: 70rpx;
		height: 70rpx;
	}

	.shopping-cart-suspension-window {
		position: fixed;
		bottom: 200rpx;
		right: 20rpx;
		background-color: white;
		box-shadow: 0 0 10rpx #888;
		border-radius: 50%;
		width: 70rpx;
		height: 70rpx;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.shopping-cart-suspension-window image {
		width: 50rpx;
		height: 50rpx;
	}



	.horizonal-tab {
		color: #ccc;
	}

	.horizonal-tab .active {
		color: #000;
		height: 100%;
	}


	.scroll-tab-item {
		height: 45rpx;
		line-height: 45rpx;
		display: inline-block;
		/* 必要，导航栏才能横向*/
		margin: 0rpx 30rpx 0 30rpx;
	}

	.active .scroll-tab-line {
		border-bottom: 5rpx solid #30c4cc;
		border-top: 5rpx solid #30c4cc;
		border-radius: 20rpx;
		width: 100%;
		margin: 0 auto;
		color: #000;
	}

	.info {
		padding: 20px;
	}

	.bkTop {
		bottom: 180rpx;
		right: 20rpx;
		z-index: 30;

		.top,
		.bot {
			width: 100rpx;
			height: 100rpx;
			background-color: #fff;
			border-radius: 100rpx;
			overflow: hidden;
		}
	}

	.shop-cart {
		width: 100%;

		.btn-left {
			padding: 0;
			margin: 0;
			width: 45%;
			border-radius: 0;
			border-top-left-radius: 50rpx;
			border-bottom-left-radius: 50rpx;
			background-color: #383838;
		}

		.btn-right {
			padding: 0;
			margin: 0;
			width: 45%;
			border-radius: 0;
			border-top-right-radius: 50rpx;
			border-bottom-right-radius: 50rpx;
			background-color: #09BB07;
		}
	}


	.title-point {
		width: 100%;
		height: 130rpx;
		background-image: linear-gradient(to bottom, limegreen, lightgreen, darkgreen);
		margin-top: 10rpx;
		margin-bottom: 60rpx;

	}

	.titlet {
		width: 100%;
		text-align: center;
	}

	.myPoint {
		width: 550rpx;
		height: 60rpx;
		border: 2px solid lavender;
		border-radius: 30rpx;
		margin: 30rpx auto;
		background-color: white;
		padding: 10rpx;
		display: flex;
		flex-direction: row;
		margin-top: 30rpx;
	}

	.imgPoint {
		width: 60rpx;
		height: 60rpx;

	}

	.myPoint-text {
		margin-left: 15rpx;
	}

	.jifen {
		margin-left: 10rpx;
		font-weight: bold;
		font-size: 1.2rem;
		color: lightgreen;
	}

	@media screen and (min-width:800px) {
		.imgae_ten {
			width: 150rpx;
			height: 150rpx;
		}

		.text_ten {
			font-size: 40rpx;
		}
	}

	@media (max-width: 480px) {
		.imgae_ten {
			width: 110rpx;
			height: 110rpx;
		}
	.scroll-Y {
		height: 100vh
	}
		.text_ten {
			font-size: 24rpx;
		}
	}
	.QR {
		//   justify-content: space-between;
		flex-direction: column;
	
		.code {
			justify-content: space-between;
		}
	
		view {
			image {
				width: 120rpx;
				height: 120rpx;
			}
		}
	}
</style>